package com.quanyan.vote.utils;

import com.quanyan.common.enums.BaseEnum;

/**
 * Created by Administrator on 2016/7/22.
 */
public enum  VoteEnum implements BaseEnum{
    VOTE_TIME_IN(12,"VOTE_TIME_IN","投票开始时间是8月15日，先不要着急哦！",true),
    VOTE_TIME_OUT(13,"VOTE_TIME_OUT","本次投票活动已结束，感谢你的参与",true),
    YSE_VOTE_TODAY(15,"YSE_VOTE_TODAY","今天已经投过票了，请明天再来吧",true),
    IP_VOTE_OVER_FIVE(16,"","投票失败，请明天再试",true),
    PARAMETER_CANT_BE_EMPTY_FOR_VOTE(17,"PARAMETER_CANT_BE_EMPTY_FOR_VOTE","服务器太忙了，请稍后再试！",false),
    ;

    protected int id;

    protected String code;

    protected String label;

    protected boolean success;


    VoteEnum(int id, String code, String label, boolean success) {
        this.id = id;
        this.code = code;
        this.label = label;
        this.success = success;
    }

    @Override
    public boolean isSuccess() {
        return success;
    }

    @Override
    public int getId() {
        return id;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getLabel() {
        return label;
    }
}
